/* App.css - 简化版样式（不依赖Tailwind CSS） */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
  'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
  sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  overflow-x: hidden;
}

/* 主应用容器 */
.app {
  min-height: 100vh;
  background: linear-gradient(-45deg, #1e293b, #7c3aed, #1e293b, #3b82f6);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 导航栏样式 */
.navbar {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
}

.logo-accent {
  color: #a855f7;
}

.nav-buttons {
  display: flex;
  gap: 1rem;
}

.nav-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  color: #d1d5db;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  color: white;
  transform: translateY(-1px);
}

.nav-btn.active {
  background: #7c3aed;
  color: white;
}

.logout-btn {
  color: #d1d5db !important;
}

/* 主内容区域 */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* 页面容器 */
.page-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

.form-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.form-container.large {
  max-width: 800px;
}

/* 表单标题 */
.form-title {
  text-align: center;
  margin-bottom: 2rem;
}

.form-title h1 {
  font-size: 2rem;
  font-weight: bold;
  color: white;
  margin-bottom: 0.5rem;
}

.form-title p {
  color: #d1d5db;
}

/* 消息提示 */
.message {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.message.error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.message.success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #86efac;
}

/* 表单样式 */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d1d5db;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.5);
}

.form-textarea {
  resize: none;
  min-height: 80px;
}

/* 密码输入框容器 */
.password-container {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
}

.password-toggle:hover {
  color: white;
}

/* 验证码输入组 */
.verify-group {
  display: flex;
  gap: 0.5rem;
}

.verify-input {
  flex: 1;
}

.verify-btn {
  padding: 0.75rem 1rem;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.verify-btn:hover:not(:disabled) {
  background: #6d28d9;
  transform: translateY(-1px);
}

.verify-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 文件上传 */
.file-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.file-input::-webkit-file-upload-button {
  margin-right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: none;
  font-size: 0.875rem;
  background: #7c3aed;
  color: white;
  cursor: pointer;
}

.file-input::-webkit-file-upload-button:hover {
  background: #6d28d9;
}

/* 按钮样式 */
.btn {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(to right, #7c3aed, #3b82f6);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover:not(:disabled) {
  background: linear-gradient(to right, #6d28d9, #2563eb);
  transform: translateY(-1px) scale(1.02);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #6b7280;
}

.btn-secondary:hover:not(:disabled) {
  background: #4b5563;
}

.btn-success {
  background: #059669;
}

.btn-success:hover:not(:disabled) {
  background: #047857;
}

/* 链接样式 */
.form-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.form-footer p {
  color: #d1d5db;
}

.form-link {
  margin-left: 0.25rem;
  color: #a855f7;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
}

.form-link:hover {
  color: #c084fc;
}

/* 个人中心样式 */
.profile-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.profile-title h1 {
  font-size: 2rem;
  font-weight: bold;
  color: white;
  margin-bottom: 0.5rem;
}

.profile-title p {
  color: #d1d5db;
}

.edit-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.edit-btn:hover {
  background: #6d28d9;
  transform: translateY(-1px);
}

.profile-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #d1d5db;
}

.info-label {
  font-weight: 500;
}

.info-value {
  color: white;
}

.info-input {
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 0.875rem;
}

.info-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.5);
}

.bio-section {
  color: #d1d5db;
}

.bio-text {
  color: white;
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
}

.bio-textarea {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  resize: none;
  min-height: 80px;
}

.save-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #059669;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.save-btn:hover:not(:disabled) {
  background: #047857;
  transform: translateY(-1px);
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
}

.stat-icon {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
}

.stat-label {
  font-size: 0.875rem;
  color: #d1d5db;
}

/* 邀请码卡片 */
.invite-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  padding: 1rem;
}

.invite-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.invite-header span {
  font-weight: 500;
  color: white;
}

.invite-code-display {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.invite-code-label {
  font-size: 0.875rem;
  color: #d1d5db;
  margin-bottom: 0.25rem;
}

.invite-code-value {
  font-size: 1.125rem;
  font-family: monospace;
  color: white;
  font-weight: bold;
}

.invite-placeholder {
  color: #d1d5db;
  margin-bottom: 0.75rem;
}

.invite-btn {
  width: 100%;
  padding: 0.5rem;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.invite-btn:hover:not(:disabled) {
  background: #6d28d9;
}

.invite-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 加载状态 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  color: white;
  font-size: 1.125rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-container {
    padding: 1rem;
  }

  .nav-logo {
    font-size: 1.25rem;
  }

  .main-content {
    padding: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .profile-content {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .verify-group {
    flex-direction: column;
  }

  .verify-btn {
    width: 100%;
  }
}

/* 图标样式 */
.icon {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  vertical-align: middle;
}

.icon-lg {
  width: 1.25rem;
  height: 1.25rem;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.8);
}